package think.in.java.concurrency.practise.exec1;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 5/18/11
 * Time: 11:58 PM
 * To change this template use File | Settings | File Templates.
 */
public class ExcOne implements Runnable{
    private String startMessage;
    private int countDown = 3;
    public ExcOne(String startMessage){
        this.startMessage = startMessage;
    }

    public void run() {
        System.out.println("Start with "+ startMessage);
        while (countDown-->0){

            System.out.println("exeute last " + countDown + " times.");
            Thread.yield();
        }
        System.out.println("exit!");
    }
}
